using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Zsnd.Helpers;
using MaymuseMS.DAL;
using MaymuseMS.Models;

namespace MaymuseMS.Controllers {
    public class InDepositoryController : GenericController {

        public ActionResult InDepositorys(string number, string term) {
            var indepositorys = unitOfWork.InDepositoryRepository
                .Get(i => i.ProductValueObject.Number == number && i.Number.Contains(term))
                .Select(i=> new { value = i.Number}).Distinct();
            return Json2(indepositorys);
        }
    }
}

